package com.project.common.core.page;

import com.project.common.constant.HttpStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 表格分页数据对象
 *
 * @author project
 */
@Data
@ApiModel(value = "分页参数")
public class Pager<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "消息状态码", required = false)
    private int code = HttpStatus.SUCCESS;

    @ApiModelProperty(value = "消息内容", required = false)
    private String msg = "查询成功";

    @ApiModelProperty(value = "当前页面数", required = false)
    private int pageNum = 1;

    @ApiModelProperty(value = "当前页面条数", required = false)
    private int pageSize = 20;

    @ApiModelProperty(value = "总记录数", required = false)
    private long total;

    @ApiModelProperty(value = "列表数据", required = false)
    private List<T> rows;

    /**
     * 表格数据对象
     */
    public Pager() {
    }

}
